#ifndef __HTTPPARSER_H__
#define __HTTPPARSER_H__

#include <QObject>
#include <QString>
#include <QList>

#include "parserobserver.h"
#include "customparser.h"

typedef QList < const QString* > UrlList;

class HttpParser : public QObject, public ParserObserver
{
Q_OBJECT
public:
	HttpParser( UrlList* list, QObject* parent );

	~HttpParser();

	void parse();
	void parse( QList< const QString* > list );

public slots://from parser observer
	void parsed( const QString& url, CustomParser* parser );
	void parsingError( int error, CustomParser* parser );
	void progress( int progress );

signals:
		void linkParsed( const QString& url );
		void parseErr( int error );

private:
	UrlList					m_items;
	QList< CustomParser* >	m_customParsers;
	int						m_progress;
	int						m_total;
};

#endif //__HTTPPARSER_H__
//eof
